pp108 : XML Editor

XML Editor

This topic introduces the XML editor.


The XML Editor enables you to embed XML definitions or XML data islands in an XForm. These definitions or data islands refer to information stored as XML in the XForm. You can use this information in an application by binding the XML definitions with the HTML elements of the XForm. You can also view and customize the SOAP requests generated in case of external Web services in the XML Editor. Click the XML tab in the XForms Designer to access the XML Editor.

Process Platform XForms automatically assigns a unique ID to each XML definition that you add. If required, you can manually change this ID.

To provide an XML data island in the XML Editor, you can use the following XML document syntax:

<xml>
    <xml id="sampleXML">
        <sample>
            <id>sample</id>
            <description>some example XML</description>
        </sample>
    </xml>
</xml>


Note that each XML data island contained in the above XML has a unique ID and all the XML data islands are wrapped in a single, parent<xml></xml>tag.

By default, a dummy XML template is added to the editor as shown below. While saving the XForm, the template will be deleted if there are no changes in it. Otherwise, the XForm is saved with the updated template.

<xml>
    <xml id="xmlID" xmlns=""/>
</xml>


In order to access any XML data island such as above in the XML editor, you must use the<XMLIslandid>.XMLDocumentformat in the script. For example, use sampleXML.XMLDocument.documentElement, instead of sampleXML.documentElement.

The Application Definitions used to load any XForm is also defined in the XML editor here. For more information, see Application Definition.

XML Editor toolbar


The buttons available in the XML Editor toolbar are listed in the following table.

Table 1. Buttons in the XML Editor Toolbar

Button

Button Name

Description

Validate and Format XML

Validates and formats the syntax of the XML. A notification message displays in case of errors.

Reload XML Without saving changes

Displays original XML without saving any changes made in the XML Editor.


Related concepts

XForms Designer
Script Editor